//引入request因为里面封装了axios
import request from '@/utils/request'

export default{
    //1.获取所有章节信息
    getChapterListAll(courseId){
        return request({
            url: `/eduservice/chapter/getChapterVideo/${courseId}`,
            method:'get',
        })
    },
    //2.添加章节信息
      addChapter(chapter){
        return request({
            url: `/eduservice/chapter/addChapter`,
            method:'post',
            data:chapter
        })
    },
    //3.根据章节ID查询章节信息
     getChapter(chapterId){
        return request({
            url: `/eduservice/chapter/getChapterInfo/${chapterId}`,
            method:'get',
        })
    },
     //4.修改章节信息
     updateChapter(chapter){
        return request({
            url: `/eduservice/chapter/updateChapter`,
            method:'post',
            data: chapter
        })
    },
    //5.删除章节信息
    deleteChapter(chapterId){
        return request({
            url: `/eduservice/chapter/${chapterId}`,
            method:'delete',
        })
    }
}